

import 'package:flutter/material.dart';
import 'package:h_flutter_119/page/detail_page/EyeDetailPage.dart';
import 'package:h_flutter_119/page/preview/PhotoPreviewPage.dart';
import 'package:h_flutter_119/page/search/SearchPage.dart';
import 'package:h_flutter_119/page/webpage/WebPage.dart';

goWeb(BuildContext context,String url,{String title = ""}){
  Navigator.push(context, MaterialPageRoute(builder: (context) => WebPage(url, title)));
}

goVideoDetail2(BuildContext context,String videoUrl,String videoId,String coverUrl){
  Map<String,dynamic> map = {};
  map['playUrl'] = videoUrl;
  map['videoId'] = videoId;
  map['coverUrl'] = coverUrl;
  Navigator.push(context, MaterialPageRoute(builder: (context) => EyeDetailPage(map)));
}

goVideoDetail(BuildContext context,Map<String,dynamic> map) => Navigator.push(context, MaterialPageRoute(builder: (context) => EyeDetailPage(map)));

goPhotoPreview(BuildContext context,String url) => Navigator.push(context, MaterialPageRoute(builder: (context) => PhotoPreviewPage(url)));

goSearchPage(BuildContext context) => Navigator.push(context, MaterialPageRoute(builder: (context) => SearchPage()));